An Object-Oriented Approach to Basic Mechanics
نویسنده
چکیده
An approach is suggested for a methodology associated with basic mechanics that greatly enlarges the scope of problems accessible to students and professionals. A numerical approach based on Newtonian point-mass mechanics and pseudo-rigid bodies brings problems such as three-dimensional dynamics and constrained motions into the arena of basic mechanics. Because solutions of almost any problems of interest require computation, integrated study of physics, math, and computation is essential. An object-oriented computational approach is extremely useful since all models can be expressed with the same set of basic elements. Introduction “Basic mechanics” is defined as the material associated with the mechanics of rigid bodies that is presented to students in the last two years of high school through the first three years of college. Some of the material is presented in physics courses and some of it in engineering courses. Basic mechanics is important for engineers because it: • Forms the basis for the study of advanced mechanics, • Forms the basis for a number of engineering application areas, • Establishes the pattern by which engineers approach problems involving mechanics. The last of these points is important in engineering practice because “easy” problems are generally defined as those that can be solved using material generally classified as basic mechanics. The purpose of this paper is to reexamine “basic” so as to increase the scope of problems considered “easy.” The starting point for this reexamination is the following two questions: 1. What is the purpose of the basic mechanics curriculum? 2. What is the appropriate role of computation in formulation of the curriculum? While these questions themselves are subjects for considerable debate, answers to them are proposed as a means of guiding this study. Different answers would, of course, lead to different approaches to basic mechanics -indeed, even the same answers could lead to different approaches. The proposed responses are: 1. The purpose of the basic mechanics curriculum is to equip engineers with tools enabling them to solve the broadest possible class of problems. DRAFT: January 31, 2000 2 2. Computation is central to the professional activities of engineers. Integration of computing methodology with the engineering science curriculum is highly desirable. The first answer, the purpose of the basic mechanics curriculum, is very pragmatic. The reasons behind the choice are both professional and historical. Professionally, engineers use physics and related engineering science subject areas to allow them to predict the behavior of actual or potential products for the purpose of improving the performance of those products. Thus, the broader the range of problems they can solve, the more effective they will be at that aspect of their engineering work. The present mechanics curriculum shows signs of the same pragmatic approach. Its antecedents go so far back that, at this point, it is hard to separate pragmatism from “fundamental” material. A reasonable case can be made, however, that most of the current basic mechanics curriculum consists of a set of techniques that allow solutions to be obtained for certain special cases in the absence of a computer. In pre-computer times, therefore, a student would be as well equipped as possible to solve problems in mechanics. While integration of computation with the curriculum sounds good on the surface, it brings up the following controversial issue: Is it reasonable to design a curriculum that depends almost entirely on computation to obtain solutions? This question will certainly be answered in the negative by a substantial number of engineering educators. However, this paper is based on an affirmative response. The rationale is that very few problems of modern practical engineering importance can be solved without a computer. Computer-based solution techniques can be justified if they broaden the scope of problems that can be solved. The approach to mechanics proposed here starts with the assertion that there are two fundamental topics to be covered: 1) kinematics, and 2) Newtonian mechanics. Kinematics establishes the concepts of position, velocity and acceleration in the common three-dimensional space. Newtonian mechanics describes the connections among inertial, point-mass bodies, forces and kinematics. All material beyond this represents techniques that allow these fundamental principles to be used to solve problems of practical importance. The method chosen, for its generality, is to treat all mechanical bodies as pseudo-rigid. That is, mechanical bodies are modeled as collections of point-masses connected by springs (and, possibly, dampers) that are very stiff, but not infinitely stiff. The stiffness must be high enough to maintain the mechanical integrity of the body to some desired tolerance. Bodies modeled this way can be connected to other bodies or to constraints to solve mechanical system problems. Problems formulated in this manner can be solved as initial-condition ordinary differential equations (ODEs). Each mass contributes six states to the system equation (that is, six first-order ODEs -for position and velocity in x, y, and z). While the use of pseudo-rigid bodies as a modeling technique is not new, it is proposed here as a unifying methodology for basic level mechanics. Point-mass modeling can be used to solve a huge variety of problems in rigid body mechanics, including three-dimensional dynamics, constrained motions, rotational motions, etc., all within DRAFT: January 31, 2000 3 the context of solving sets of first-order, nonlinear ODEs. The solution is only practical using computer methods because of the large number of equations generated even by relatively simple systems. However, the scope of problems that can be solved covers many areas currently considered advanced. The trade-off for this generality is the need to understand and carefully apply error analysis to the results. Because of the stiff springs, the ODEs are mathematically relatively stiff so choice of solution method and error control can be quite important. A second layer of error is introduced because of the pseudo-rigid model (i.e., how stiff is stiff enough?) Because point-mass models of rigid bodies are all constructed from a small set of primitive elements, masses, springs, dampers, an object-oriented approach to computational implementation is natural. The object-oriented approach is efficient because models are built from pre-defined elements and those elements can be extended to account for situations not anticipated at the time the original software base was created. The extensions themselves use the same syntax as the original model elements so, if well designed, are also reusable and appear to subsequent users as no different than the original library of modeling elements. Because the method of constructing computational models is well defined, it is as effective for the development of automated or semi-automated modeling software as it is for direct model construction in the base language. At the lowest level, classes are defined for masses and for connectors. Connectors include both springs and dampers. Modelers, however, interact with a more abstract class representing rigid bodies. Each of these elements contains a collection of masses and connectors. The rigid body abstraction is important because it allows for underlying models to be changed without changing the application code. Motivation The notion that a reexamination of the basic mechanics curriculum was warranted came from experience with a freshman seminar titled “Animating Physics.” The purpose of this seminar was to offer an attractive experience that would parallel and integrate material from math, physics, and computation courses. The theme of the course was the production of physically realistic animations, that is, animations in which the motions of the objects obeyed the laws of physics (http://euler.Berkeley.EDU/~dma/res.html, then follow links to ME39E, Animating Physics). The prerequisite was high school physics (calculus was not required). Figure 1 shows a typical student project from this class. This is the opening graphic that was animated. The animations were all two-dimensional, done completely in Matlab. A graphics-animation package was supplied that allowed students to concentrate on the basic pictorial description of their problem (circles, rectangles, shapes made of multiple lines) and the computation via simulation of successive positions, shapes, colors, etc. (see the above-mentioned web site for copies of the sample software). Students were responsible for all of the programming involving Figure 1. Student Project: Newton's Cradle DRAFT: January 31, 2000 4 the physics of their specific problems. The programming was done using Matlab’s standard procedural language. The course was successful as a seminar in several ways: • It did interest students. Animation was a theme that people could identify with and understood immediately. • Students dealt with integration of math, physics, and computing in a natural way. It was very clear that such integration was necessary to produce an animation. • It explored the role of extended projects in engineering science instruction. Students picked problems with significant complexity and were not afraid of nonlinearities or system configuration changes. Despite the successes of this seminar, several disturbing factors emerged. Two were particularly influential in motivating a complete reexamination of the physics curriculum: • Students were notably unprepared for dealing with a numerical approach to problem solving. • There were a number of interesting problems for which they had no useful formulation tools, particularly problems involving simple constrained motions. The numerical approach to problem solving in physics was clearly alien to these students. They seemed to feel that all solutions should be expressible as closed-form expressions for position. They also had no experience with anything but the special case problems (constant velocity, constant acceleration, etc.) for which formulaic results are available. Since students selected their own projects, a large variety of physical situations were represented. Some of these used physical configurations for which none of the solution methods available to students at this level were applicable. A good example of a problem of this sort is the double pendulum. The single pendulum is discussed in all basic physics classes, but the solution used is not generalizable to a double pendulum. A Numerical/Computational Approach The work in the Animating Physics seminar strongly suggested a numerical approach to mechanics. However, an examination of the current curriculum is not encouraging. Because a substantial part of the curriculum is devoted to special cases for which analytical solutions can be obtained, it does not seem that a numerical approach would add much. Adding numerics to the existing curriculum might allow for introduction of some nonlinearity, but would not expand on the scope of problems that could be solved. An alternative is needed! The current curriculum can be viewed in three parts: kinematics, Newtonian point-mass mechanics, and special cases of problems that can be solved without a computer. If a suitable methodology can be found, an attractive approach would be to keep the first two topics because they represent fundamental physical phenomena and eliminate the special cases. Such an approach is discussed below. DRAFT: January 31, 2000 5 Kinematics Basic kinematics describes motion in the normal Euclidian three-dimensional space. Decomposition of the motion into orthogonal components is a key element. Most of the actual numerics in solving mechanics problems is in the kinematics. All problems are viewed incrementally, with acceleration or velocity given and position (and velocity, if necessary) calculated by accumulation. Finite accumulation is used rather than the integral or differential equation formulation to allow introduction of this material before calculus. This order should actually help the calculus courses because it would add motivation and relevance to the calculus material. The basic Euler formulation for numerical solution of differential equations is used to introduce incremental kinematics, t t a t v t t v ∆ + = ∆ + ) ( ) ( ) ( Eq (1) t t v t x t t x ∆ + = ∆ + ) ( ) ( ) ( Eq (2) This form makes intuitive sense and is easy to explain and implement. It can be used either for evaluation of integrals or for differential equations. It can be applied to orthogonal components or to motion along a path. Understanding the use of this formulation is the key to the numerical approach. Newtonian mechanics will be used to calculate accelerations for a system of bodies. These kinematic relations are then used to calculate the actual velocities and positions. An example of this approach is the problem of motion along a prescribed path. This problem, and several variants of it, is used as a theme problem for the sections that follow. It is typical of problems that students can work on using the approach described here. It uses the numerical/computational approach to generalize well beyond the types of problems that can be solved using the current curriculum. However, the programming involved requires student intensity that is beyond that of the current curriculum also. In this case, the problem is stated in terms of velocity. That is, the velocity and the nature of the path are specified. The objective is to calculate the position of the object as a function of time. Only the second of the Euler forms, for position, is needed for this problem. The general method of solution is to compute how far the object will move along the path for the current time increment, then use a search algorithm to find the point on the path the given distance from the current point. The search is a one-dimensional search with the angle from the current point as the search variable. As an assignment, this problem has a number of interesting aspects. In addition to exploring the kinematics of a velocity-specified problem, there is the issue of how to do a search (i.e., solve a general one-dimensional nonlinear equation). A number of simple problems can be given initially, such as straight lines and circles. These problems are also solvable analytically, if desired. Figure 2 shows the result for a circle. The X and Y positions versus time show the familiar sinusoidal shapes and the swept angle increases proportionally with time. DRAFT: January 31, 2000 6 Unlike the analytical result for a problem of this sort, the numerical solution is fully generalizable. For example, the velocity along the path may not be a constant, Figure 3. On the other hand, the path might not be circular, Figure 4. In this case, though the velocity along the path is also constant, the X and Y positions of the object versus are not even vaguely sinusoidal, nor does the swept angle vary linearly with time. 0 5 10 0 0.5 1 1.5 2
منابع مشابه
Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey
One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...
متن کاملModelsaz: An Object-Oriented Computer-Aided Modeling Environment
Modeling and simulation of processing plants are widely used in industry. Construction of a mathematical model for a plant is a time-consuming and error-prone task. In light of extensive advancements in computer science (both hardware and software), computers are becoming a necessary instrument in industrial activities. Many software tools for modeling, simulation and optimization of proces...
متن کاملObjects Identification in Object-Oriented Software Development - A Taxonomy and Survey on Techniques
Analysis and design of object oriented is onemodern paradigms for developing a system. In this paradigm, there are several objects and each object plays some specific roles. Identifying objects (and classes) is one of the most important steps in the object-oriented paradigm. This paper makes a literature review over techniques to identify objects and then presents six taxonomies for them. The f...
متن کاملساختار دهی آنی دادههای مکانی ورودی GIS با تأکید بر عارضه راه
An important issue in implementation of a GIS system is preparation of data to be entered in GIS. To produce spatial data for GIS using photogrammetric techniques, conventional method is to apply photogrammetric and GIS systems individually (off-line procedure). This approach is costly, time consuming and somehow unreliable due to the fact that 3D photogrammetric model is not available at the ...
متن کاملOn Attributes of Objects in Object-Oriented Software Analysis
One of the modern paradigms to develop a system is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles. There is a sequence of activities to develop an analysis model. In the first step, we work in developing an initial use case model. Then in the second step, they identify a number of concepts and build a glossary of partic...
متن کاملAvailability evaluation of Software architecture of object oriented Style using coloured Petri nets
Software architecture is one of the most fundamental products in the process of software development in the areas of behavioral or non- behavioral features like availability or transformability change. There are different ways to evaluate software architecture one of which is the creation of application model. An executable model of software architecture is an official description of architectu...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2000